package com.lihui.day14;

import java.util.Scanner;

/**
 * 计算日期到天数
 *
 * @author wileda
 * @date 2023/03/20  21:04
 */
public class Solution {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int year = scanner.nextInt();
        int month = scanner.nextInt();
        int day = scanner.nextInt();
        int sum = process(year,month,day);
        System.out.println(sum);

    }

    private static int process(int year,int month,int day) {
        int sum = 0;
       int[] arr = {31,28,31,30,31,30,31,31,30,31,30,31};
       if(year % 4 == 0 && year % 100 != 0 || year % 400 == 0){
           arr[1] = 29;
       }
        for (int i = 0; i < month - 1 ; i++) {
            sum += arr[i];
        }
        sum += day;
       return sum;
    }

}
